﻿using System.Runtime.InteropServices;

namespace Win32Proxy.Structs
{
    /// <summary>
    /// 矩形结构
    /// </summary>
    [StructLayout(LayoutKind.Sequential)]
    public struct RECT
    {
        public int left;
        public int top;
        public int right;
        public int bottom;

        public readonly int Width => right - left;

        public readonly int Height => bottom - top;

        public override string ToString()
        {
            return $"{{X={left},Y={top},Width={right - left},Height={bottom - top}}}";
        }
    }
}
